package cn.iocoder.yudao.module.promotion.api.promotion;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.promotion.api.promotion.dto.PromotionRespDTO;
import cn.iocoder.yudao.module.promotion.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = ApiConstants.NAME) // TODO 芋艿：fallbackFactory =
@Tag(name = "RPC 服务 - 促销")
public interface PromotionApi {
    String PREFIX = ApiConstants.PREFIX + "/product";

    @GetMapping(PREFIX + "/get")
    @Operation(summary = "根据商品id获得商品促销信息")
    @Parameter(name = "productId" , description = "商品id", example = "1024", required = true)
    CommonResult<PromotionRespDTO> getPromotionByProductId(@RequestParam("productId") Long productId);

}
